﻿@model EmailAccountModel

@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.Id)
<table class="adminContent">
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Email)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DisplayName):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisplayName)
            @Html.ValidationMessageFor(model => model.DisplayName)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Host):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Host)
            @Html.ValidationMessageFor(model => model.Host)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Port):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Port)
            @Html.ValidationMessageFor(model => model.Port)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Username):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Password):
        </td>
        <td class="adminData">
            @Html.PasswordFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
            @if (Model.Id > 0)
            {
                <input type="submit" name="changepassword" class="k-button" value="@T("Admin.Configuration.EmailAccounts.Fields.Password.Change")" />
            }
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.EnableSsl):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.EnableSsl)
            @Html.ValidationMessageFor(model => model.EnableSsl)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.UseDefaultCredentials):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.UseDefaultCredentials)
            @Html.ValidationMessageFor(model => model.UseDefaultCredentials)
        </td>
    </tr>
    @if (Model.Id > 0)
    {
        <tr class="adminSeparator">
            <td colspan="2">
                <hr />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <p>
                    <strong>@T("Admin.Configuration.EmailAccounts.SendTestEmail")</strong>
                </p>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.SendTestEmailTo):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.SendTestEmailTo)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
            </td>
            <td class="adminData">
                <input type="submit" name="sendtestemail" class="k-button" value="@T("Admin.Configuration.EmailAccounts.SendTestEmail.Button")" />
            </td>
        </tr>
    }
</table>
